package com.yc.grpc.host;

import com.yc.grpc.GrpcHostProperties;
import lombok.AllArgsConstructor;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Component;

/**
 * @Author: ZhouJianLong
 * @Date: 2024/07/22/10:18
 * @Description:
 */
@Component
@RequiredArgsConstructor
public class GatewayHost implements AbstractGrpcHost{
    private final GrpcHostProperties grpcHostProperties;

    @Override
    public String host() {
        return grpcHostProperties.getHost();
    }

    @Override
    public Integer port() {
        return grpcHostProperties.getPort();
    }
}
